<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>管理员列表</title>
  <meta name="description" content="用户列表">
  <meta name="keywords" content="table">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="${staticHost }/back/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="${staticHost }/back/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="${staticHost }/back/css/amazeui.min.css"/>
  <link rel="stylesheet" href="${staticHost }/back/css/admin.css">
  <link rel="stylesheet" href="${staticHost }/css/font-awesome.min.css"/>
</head>
<body>
	<!--[if lte IE 9]>
	<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
	  以获得更好的体验！</p>
	<![endif]-->
	<c:import url="../commons/header.jsp" />
	<div class="am-cf admin-main">
	  <c:import url="/back/menu" />
	  <!-- content start -->
		<div class="admin-content">
		
		  <div class="am-cf am-padding">
		    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">管理员列表</strong> / <small>添加管理员</small></div>
		  </div>
	        <form class="am-form" id="mng-user-form" action="saveMngUser" method="post">
	        	<input type="hidden" name="id" id="mng-user-id" value="${muser.id }" /> 
	          <div class="am-g am-margin-top">
	            <div class="am-u-sm-4 am-u-md-2 am-text-right">
	              	用户名
	            </div>
	            <div class="am-u-sm-6 am-u-md-4">
	              <input type="text" name="username" id="username" value="${muser.username }" class="am-input-sm">
	            </div>
	            <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
	          </div>
	          <div class="am-g am-margin-top">
	            <div class="am-u-sm-4 am-u-md-2 am-text-right">
	             	 真实姓名
	            </div>
	            <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
	              <input type="text" name="truename" id="truename" value="${muser.truename }" class="am-input-sm">
	            </div>
	          </div>
			  <div class="am-g am-margin-top">
		          <div class="am-u-sm-4 am-u-md-2 am-text-right">角色</div>
		          <div class="am-u-sm-4 am-u-md-4 am-u-end col-end">
		            <select id="role-select" name="roleId">
		            	<option value="">---请选择角色---</option>
		            	<c:forEach var="role" items="${requestScope.roles }">
		            	<option value="${role.id }" <c:if test="${muser.roleId == role.id }">selected="selected"</c:if>>${role.name }</option>
		            	</c:forEach>
				    </select>
		          </div>
		       </div>
	          <div class="am-g am-margin-top">
	            <div class="am-u-sm-4 am-u-md-2 am-text-right">
	              	登录密码
	            </div>
	            <div class="am-u-sm-8 am-u-md-4">
	              <input type="password" name="password" class="am-input-sm">
	            </div>
	            <div class="am-hide-sm-only am-u-md-6">选填</div>
	          </div>
	        </form>
		  <div class="am-margin">
		    <button type="button" class="am-btn am-btn-primary am-btn-xs" id="sub-btn">提交保存</button>
		    <button type="button" class="am-btn am-btn-primary am-btn-xs">放弃保存</button>
		  </div>
		</div>
		<!-- content end -->
	</div>
	
	<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu" data-am-offcanvas="{target: '#admin-offcanvas'}"></a>
	<c:import url="../commons/footer.jsp" />
	<!--[if lt IE 9]>
	<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
	<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
	<script src="${staticHost }/back/js/amazeui.ie8polyfill.min.js"></script>
	<![endif]-->
	
	<!--[if (gte IE 9)|!(IE)]><!-->
	<script src="${staticHost }/back/js/jquery.min.js"></script>
	<script src="${staticHost }/js/plugins/validate/jquery.validate.min.js"></script>
	<script src="${staticHost }/js/plugins/validate/messages_zh.min.js"></script>
	<!--<![endif]-->
	<script src="${staticHost }/back/js/amazeui.min.js"></script>
	<script src="${staticHost }/back/js/app.js"></script>
	<script src="${staticHost }/back/js/manage/mng-user.js"></script>
</body>
</html>